#pragma once
#include "mytypes.h"
#include "dynamics.h"

namespace poly
{
	class RigidPoly;
	class RigidCircle;
	class IRigidCollider
	{
	public:
		virtual void collide( IRigidCollider * ) = 0;
		virtual void collide( RigidPoly * ) = 0;
		virtual void collide( RigidCircle * ) = 0;
	};

	// represents a rigid body collision constraint
	// usage:
	// add the set of colliding bodies to the colliders set
	class RigidCollision : public IConstraint
	{
	public:
		void apply(float dt);

		typedef std::set<IRigidCollider*> RigidCollSet;

		RigidCollSet colliders;
	};
}
